package com.sunwayworld.basemodule.samplemanage.sample.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.sunwayworld.framework.constant.Constant;
import com.sunwayworld.framework.data.annotation.Id;
import com.sunwayworld.framework.data.annotation.NotNull;
import com.sunwayworld.framework.data.annotation.Table;
import com.sunwayworld.framework.data.annotation.Transient;
import com.sunwayworld.framework.support.domain.AbstractInsertable;
import com.sunwayworld.framework.support.domain.Insertable;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 样本表
 *
 * @author liuwei0602@sunwayworld.com
 * @date 2023-01-06
 */
@Table("T_LIMS_SAMPLE")
public class LimsSampleBean extends AbstractInsertable<Long> implements Insertable<Long> {

    @Transient
    private static final long serialVersionUID = -82566196618711043L;

    @Id
    private Long id;// 主键
    @NotNull(defaultValue = "draft")
    private String status;// 状态
    private String sampleCode;// 样本编号（更名为：申请单号）
    private String hissampleCode;// 分院样本编号，可页面手动输入，可导入，非必填
    private String hissampleTypeName;// 分院样本类型，页面暂不展示，仅接收报文结果并保存
    private String sampleTypeCode;// 样本类型编码
    private String sampleType;// 样本类型
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime collectTime;// 采集时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inStoreTime;// 入库时间
    private String receiveStatus;// 接收状态
    private String receiveAbnormalType;// 接收异常类型
    private String receiveAbnormalRemark;// 接收异常备注
    private String abnormalHandleType; // 异常处理方式
    private String abnormalHandleRemark;  // 异常处理备注

    private String oriNo;// 原始样本编号
    private String parentNo;// 父样本编号
    @NotNull(defaultValue = Constant.NO)
    private String useFlg;// 衍生物启用状态： 0，否；1，是
    @NotNull(defaultValue = Constant.NO)
    private String qcSampleFlg;// 是否质控样
    @NotNull(defaultValue = Constant.YES)
    private String originalFlg;// 是否原始样本
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expiredTime;// 样本过期时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireReminderTime;// 提醒时间
    @NotNull(defaultValue = Constant.NO)
    private String expireFlg; // 过期确认标识
    private Long boardId;// 板ID
    private Long boardHoleId;// 孔ID
    private String locations;// 位置描述
    private Long sampleHandleId;// 处置ID
    @NotNull(defaultValue = "draft")
    private String handleType;// 样本流转状态   wait： 衍生物生成后待入库状态
    @NotNull(defaultValue = Constant.NO)
    private String inHandle;// 是否可处置  未进入实验为0，入库后为1 （进入实验自动入库），出库后为2（可入库）, 衍生物为3（可入库）, 销毁后为4, 返样后为5
    private String restCount;// 剩余数量
    private String createdById;// 制单人编码
    private String createdByName;// 制单人名称
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;// 制单时间
    private String createdByOrgId;// 制单人单位编码
    private String createdByOrgName;// 制单人单位名称

    // 样本基本属性
    private String sampleName;// 姓名
    private String akHospitalLine;// 爱康分院检线号，页面暂不展示该字段
    private String idCardNo; // 证件号码
    private String age;// 年龄
    private String gender;// 性别
    private String customerCode;// 送检客户编号
    private String customerName;// 送检客户名称
    private String customerNickName;// 送检客户简称
    private String remark;// 样本备注
    private String remark1;// 备注1
    private String remark2;// 备注2

    // 物流信息
    private String temperatureLimits;  // 温度要求
    private String senderName;  //寄件人姓名
    private String senderPhone; //寄件人电话
    private String courierNumber;   //物流运单号
    private String courier; //物流公司
    private String senderRemark;    //物流备注

    //    private String sendByUnit;// 送检单位  -- 暂时用送检客户
    private String sendByDoctor;// 送检医生
    private String medicationHistory;// 用药史
    private String familyHistory;// 家族史
    private String clinicalDiagnosis;// 临床诊断
    private String pathologyNumber;// 病理编号
    private String samplePhone;// 联系电话
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sampleSendTime;// 送样时间
    private String height;// 身高
    private String weight;// 体重
    private String expNumber;// 实验编号，生成规则：T-板编号-位置号（位置号为先横后竖）

    /*
    * lis接口字段
    * */
    private String userName;// 账户姓名，暂不显示
    private String passWord;// 账户密码，暂不显示
    private String ageUnit;// 年龄单位，在lims订单界面使用

    public LocalDateTime getSampleSendTime() {
        return sampleSendTime;
    }

    public void setSampleSendTime(LocalDateTime sampleSendTime) {
        this.sampleSendTime = sampleSendTime;
    }

    public String getSamplePhone() {
        return samplePhone;
    }

    public void setSamplePhone(String samplePhone) {
        this.samplePhone = samplePhone;
    }

    public String getSendByDoctor() {
        return sendByDoctor;
    }

    public void setSendByDoctor(String sendByDoctor) {
        this.sendByDoctor = sendByDoctor;
    }

    public String getMedicationHistory() {
        return medicationHistory;
    }

    public void setMedicationHistory(String medicationHistory) {
        this.medicationHistory = medicationHistory;
    }

    public String getFamilyHistory() {
        return familyHistory;
    }

    public void setFamilyHistory(String familyHistory) {
        this.familyHistory = familyHistory;
    }

    public String getClinicalDiagnosis() {
        return clinicalDiagnosis;
    }

    public void setClinicalDiagnosis(String clinicalDiagnosis) {
        this.clinicalDiagnosis = clinicalDiagnosis;
    }

    public String getPathologyNumber() {
        return pathologyNumber;
    }

    public void setPathologyNumber(String pathologyNumber) {
        this.pathologyNumber = pathologyNumber;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRestCount() {
        return restCount;
    }

    public void setRestCount(String restCount) {
        this.restCount = restCount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSampleCode() {
        return sampleCode;
    }

    public void setSampleCode(String sampleCode) {
        this.sampleCode = sampleCode;
    }

    public String getSampleTypeCode() {
        return sampleTypeCode;
    }

    public void setSampleTypeCode(String sampleTypeCode) {
        this.sampleTypeCode = sampleTypeCode;
    }

    public String getSampleType() {
        return sampleType;
    }

    public void setSampleType(String sampleType) {
        this.sampleType = sampleType;
    }

    public LocalDateTime getCollectTime() {
        return collectTime;
    }

    public void setCollectTime(LocalDateTime collectTime) {
        this.collectTime = collectTime;
    }

    public LocalDateTime getInStoreTime() {
        return inStoreTime;
    }

    public void setInStoreTime(LocalDateTime inStoreTime) {
        this.inStoreTime = inStoreTime;
    }

    public String getReceiveStatus() {
        return receiveStatus;
    }

    public void setReceiveStatus(String receiveStatus) {
        this.receiveStatus = receiveStatus;
    }

    public String getReceiveAbnormalType() {
        return receiveAbnormalType;
    }

    public void setReceiveAbnormalType(String receiveAbnormalType) {
        this.receiveAbnormalType = receiveAbnormalType;
    }

    public String getReceiveAbnormalRemark() {
        return receiveAbnormalRemark;
    }

    public void setReceiveAbnormalRemark(String receiveAbnormalRemark) {
        this.receiveAbnormalRemark = receiveAbnormalRemark;
    }

    public String getOriNo() {
        return oriNo;
    }

    public void setOriNo(String oriNo) {
        this.oriNo = oriNo;
    }

    public String getParentNo() {
        return parentNo;
    }

    public void setParentNo(String parentNo) {
        this.parentNo = parentNo;
    }

    public String getUseFlg() {
        return useFlg;
    }

    public void setUseFlg(String useFlg) {
        this.useFlg = useFlg;
    }

    public String getQcSampleFlg() {
        return qcSampleFlg;
    }

    public void setQcSampleFlg(String qcSampleFlg) {
        this.qcSampleFlg = qcSampleFlg;
    }

    public String getOriginalFlg() {
        return originalFlg;
    }

    public void setOriginalFlg(String originalFlg) {
        this.originalFlg = originalFlg;
    }

    public LocalDateTime getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(LocalDateTime expiredTime) {
        this.expiredTime = expiredTime;
    }

    public LocalDateTime getExpireReminderTime() {
        return expireReminderTime;
    }

    public void setExpireReminderTime(LocalDateTime expireReminderTime) {
        this.expireReminderTime = expireReminderTime;
    }

    public String getExpireFlg() {
        return expireFlg;
    }

    public void setExpireFlg(String expireFlg) {
        this.expireFlg = expireFlg;
    }

    public Long getBoardId() {
        return boardId;
    }

    public void setBoardId(Long boardId) {
        this.boardId = boardId;
    }

    public Long getBoardHoleId() {
        return boardHoleId;
    }

    public void setBoardHoleId(Long boardHoleId) {
        this.boardHoleId = boardHoleId;
    }

    public String getLocations() {
        return locations;
    }

    public void setLocations(String locations) {
        this.locations = locations;
    }

    public Long getSampleHandleId() {
        return sampleHandleId;
    }

    public void setSampleHandleId(Long sampleHandleId) {
        this.sampleHandleId = sampleHandleId;
    }

    public String getHandleType() {
        return handleType;
    }

    public void setHandleType(String handleType) {
        this.handleType = handleType;
    }

    public String getInHandle() {
        return inHandle;
    }

    public void setInHandle(String inHandle) {
        this.inHandle = inHandle;
    }

    public String getCreatedById() {
        return createdById;
    }

    public void setCreatedById(String createdById) {
        this.createdById = createdById;
    }

    public String getCreatedByName() {
        return createdByName;
    }

    public void setCreatedByName(String createdByName) {
        this.createdByName = createdByName;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public String getCreatedByOrgId() {
        return createdByOrgId;
    }

    public void setCreatedByOrgId(String createdByOrgId) {
        this.createdByOrgId = createdByOrgId;
    }

    public String getCreatedByOrgName() {
        return createdByOrgName;
    }

    public void setCreatedByOrgName(String createdByOrgName) {
        this.createdByOrgName = createdByOrgName;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getCustomerCode() {
        return customerCode;
    }

    public void setCustomerCode(String customerCode) {
        this.customerCode = customerCode;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getTemperatureLimits() {
        return temperatureLimits;
    }

    public void setTemperatureLimits(String temperatureLimits) {
        this.temperatureLimits = temperatureLimits;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderPhone() {
        return senderPhone;
    }

    public void setSenderPhone(String senderPhone) {
        this.senderPhone = senderPhone;
    }

    public String getCourierNumber() {
        return courierNumber;
    }

    public void setCourierNumber(String courierNumber) {
        this.courierNumber = courierNumber;
    }

    public String getCourier() {
        return courier;
    }

    public void setCourier(String courier) {
        this.courier = courier;
    }

    public String getSenderRemark() {
        return senderRemark;
    }

    public void setSenderRemark(String senderRemark) {
        this.senderRemark = senderRemark;
    }

    public String getAbnormalHandleType() {
        return abnormalHandleType;
    }

    public void setAbnormalHandleType(String abnormalHandleType) {
        this.abnormalHandleType = abnormalHandleType;
    }

    public String getAbnormalHandleRemark() {
        return abnormalHandleRemark;
    }

    public void setAbnormalHandleRemark(String abnormalHandleRemark) {
        this.abnormalHandleRemark = abnormalHandleRemark;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }
    public String getSampleName() {
        return sampleName;
    }

    public void setSampleName(String sampleName) {
        this.sampleName = sampleName;
    }

    public String getAkHospitalLine() {
        return akHospitalLine;
    }

    public void setAkHospitalLine(String akHospitalLine) {
        this.akHospitalLine = akHospitalLine;
    }

    public String getCustomerNickName() {
        return customerNickName;
    }

    public void setCustomerNickName(String customerNickName) {
        this.customerNickName = customerNickName;
    }

    public String getHissampleCode() {
        return hissampleCode;
    }

    public void setHissampleCode(String hissampleCode) {
        this.hissampleCode = hissampleCode;
    }

    public String getRemark1() {
        return remark1;
    }

    public void setRemark1(String remark1) {
        this.remark1 = remark1;
    }

    public String getRemark2() {
        return remark2;
    }

    public void setRemark2(String remark2) {
        this.remark2 = remark2;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }
    public String getExpNumber() {
        return expNumber;
    }

    public void setExpNumber(String expNumber) {
        this.expNumber = expNumber;
    }
    public String getHissampleTypeName() {
        return hissampleTypeName;
    }

    public void setHissampleTypeName(String hissampleTypeName) {
        this.hissampleTypeName = hissampleTypeName;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getAgeUnit() {
        return ageUnit;
    }

    public void setAgeUnit(String ageUnit) {
        this.ageUnit = ageUnit;
    }
}
